<template>
  <div class="app">a</div>
  <p>{{ $store.state.moduleA.name }}</p>
  <p>{{ $store.getters['moduleA/getName'] }}</p>
  <button @click="mutationsFn">dian</button>
  <button @click="actionsFn">店家</button>
  <button @click="actionsFn">店家</button>
  <button @click="actionsFn">店家</button>
</template>
<script>
  import { useStore } from 'vuex';
  export default {
    name: 'App',
    setup() {
      const store = useStore();
      const mutationsFn = () => {
        store.commit('moduleA/updataName');
      };
      const actionsFn = () => {
        store.dispatch('moduleA/updataName');
      };
      return {
        mutationsFn,
        actionsFn,
      };
    },
  };
</script>
